package lab03.test01;

/**
 * Created by ASUS on 2017/12/14.
 */
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
public class Test {
    public static void main(String[] args) {
        String path = "D:\\hello.txt";
        BufferedWriter writer = null;
        try {
            writer = new BufferedWriter(new FileWriter(path));
            writer.write("hello,word!");
            writer.newLine();
            writer.write("1010101");
            writer.newLine();
            writer.write("bye!");
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                writer.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
